package shared;

import org.newdawn.slick.Graphics;

public class Camera {
	private static int shiftX;
	private static int shiftY;
	
	public static void init(int x, int y, int w, int h) {
		int tempX = Math.abs(640 - x) - w/2;
		int tempY = Math.abs(400 - y) - h/2;
		
		shiftX = tempX;
		shiftY = tempY;
	}
	
	public static void moveCamera(int x, int y) {
		shiftX -= x;
		shiftY -= y;
	}
	
	public static void draw(Graphics g) {
		g.translate(shiftX, shiftY);
	}
	
	public static int getShiftX() {
		return shiftX;
	}
	
	public static int getShiftY() {
		return shiftY;
	}
}
